#ifndef LRCPAGE_H
#define LRCPAGE_H

#include <QWidget>
#include <QPropertyAnimation>

namespace Ui {
class LrcPage;
}

struct LrcLine
{
    qint64 lrcTime;
    QString lrcText;
    LrcLine(qint64& time,QString& text)
    {
        lrcTime=time;
        lrcText=text;
    }
};

class LrcPage : public QWidget
{
    Q_OBJECT

public:
    explicit LrcPage(QWidget *parent = nullptr);
    ~LrcPage();
    bool parseLrc(QString lrcPath);
    int getLineLrcWordIndex(qint64 pos);
    QString getLineLrcWord(int index);
    void ShowLineLrcWord(int time);
    void ShowLrcMusicName(QString name);
    void ShowLrcMusicSinger(QString singer);

private:
    Ui::LrcPage *ui;
    QPropertyAnimation* lrcAnimation;
    QVector<LrcLine> lrcLines;
};

#endif // LRCPAGE_H
